package com.example.demo.demo;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: homechen
 * Date: 2024-03-11
 * Time: 12:49
 */

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * 定义切面类
 */
@Component
@Slf4j
@Aspect
public class MyAspect {
    @Before("@annotation(com.example.demo.demo.Mynote)")
    public void before() {
        log.info("MyAsfect --  before ---！");
    }

    @After("@annotation(com.example.demo.demo.Mynote)")
    public void after() {
        log.info("MyAsfect --  after ---！");
    }
}
